Passed
Pull Request — develop (#758)
by Kevin Van
04:28
created

HeaderBgTitle   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A render 0 7 1
1
import PropTypes from "prop-types"
2
import React from "react"
3
4
import "./header-bg-title.scss"
5
6
class HeaderBgTitle extends React.Component {
7
  render() {
8
    return (
9
      <header className={`page-header-title ${this.props.classes || ``}`}>
10
        <h1>
11
          {this.props.title} {this.props.highlight && <span className={`highlight`}>{this.props.highlight}</span>}
12
        </h1>
13
      </header>
14
    )
15
  }
16
}
17
18
HeaderBgTitle.propTypes = {
19
  title: PropTypes.string.isRequired,
20
  highlight: PropTypes.string,
21
  classes: PropTypes.string,
22
}
23
24
export default HeaderBgTitle
25